function checkAll() {
    if (!checkName()) {
        return false
    }
    if (!checkPassword()){
        return false
    }
    return true
}
function checkName() {
    var accountInput = document.getElementById("account")
    var accounttip = document.getElementById("accounttip")
    var inputVale= accountInput.value
    if (!inputVale){
        passwordtip.innerHTML = "输入用户名不能为空"
        return
    } else{
        passwordtip.innerHTML = ""
    }
    var reg = /^[a-zA-Z0-9_-]{4,16}$/
    if (reg.test(inputVale)){
        passwordtip .innerHTML = ""
    } else{
        passwordtip.innerHTML = "用户名输入格式不正确"
    }
}
function checkPassword() {
    var passwordInput = document.getElementById("password")
    var passwordtip = document.getElementById("passwordtip")
    var inputVale = passwordInput.value
    if (!inputVale){
        passwordtip.innerHTML = "输入密码不能为空"
        return
    } else{
        passwordtip.innerHTML = ""
    }
    var reg = /^[a-zA-Z0-9]{4,10}$/
    if (reg.test(inputVale)){
        passwordtip.innerHTML = ""
    } else{
        passwordtip,innerHTML = "密码输入格式不正确"
    }
}


$(".submit").click(function () {
    console.log($('.uname').val())
    console.log($('.password').val())

})